
D_XILINX_MSLOG_LIBS :=`pkg-config --libs libmslog_xilinx`
D_XILINX_MSLOG_INCLUDES :=`pkg-config --cflags libmslog_xilinx`
C_XILINX_INCLUDE=${D_BASEAPI_FLAGS} -Isrc -Isrc/denc ${D_XILINX_MSLOG_INCLUDES}  -DOS_LINUX_X32
C_XILINX_LIBS=${D_XILINX_MSLOG_LIBS} -pthread 
libmscommon_xilinx_PATH=/home/sugao/lin
libmscommon_xilinx_CC=${libmscommon_xilinx_PATH}/bin/arm-xilinx-linux-gnueabi-gcc
libmscommon_xilinx_SRC=${C_SRC}
libmscommon_xilinx_CFLAGS=${C_XILINX_INCLUDE} ${C_XILINX_LIBS} ${CFLAGS_SHARE} -I${libmscommon_xilinx_PATH}/include
	
xilinx:libmscommon_xilinx install_xilinx

libmscommon_xilinx: 
	mkdir -p $(OUT_LIB)
	mkdir -p $(OUT_INCLUDE)
	cp -fr src/*.h src/denc/*.h $(OUT_INCLUDE)
	$($@_CC)  $($@_SRC)  $($@_CFLAGS)  -o $(OUT_LIB)/$(PROGRAM_NAME).so 
	
install_xilinx: 
	mkdir -p  ${prefix_xilinx}/lib/ 
	mkdir -p  ${prefix_xilinx}/include/   
	mkdir -p  ${prefix_xilinx}/lib/pkgconfig/ 
	cp -fr $(OUT_LIB)/$(PROGRAM_NAME).so		${prefix_xilinx}/lib/     
	cp -fr $(OUT_INCLUDE)				${prefix_xilinx}/include/	     
	cp -fr platform/$(PROGRAM_NAME)_xilinx.pc	${prefix_xilinx}/lib/pkgconfig/
	
uninstall_xilinx:
	rm -fr ${prefix_xilinx}/lib/$(PROGRAM_NAME).so 
	rm -fr ${prefix_xilinx}/include/$(PROGRAM_NAME)
	rm -fr ${prefix_xilinx}/lib/pkgconfig/$(PROGRAM_NAME)_xilinx.pc
